home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 May / Mac Life Ubuntu.iso / casper / filesystem.squashfs / usr / share / perl5 / Mail / Mailer / rfc822.pm < prev    next >
Encoding:
Text File  |  2008-07-29  |  620 b   |  31 lines

  1. # Copyrights 1995-2008 by Mark Overmeer <perl@overmeer.net>.
  2. #  For other contributors see ChangeLog.
  3. # See the manual pages for details on the licensing terms.
  4. # Pod stripped from pm file by OODoc 1.05.
  5. use strict;
  6.  
  7. package Mail::Mailer::rfc822;
  8. use vars '$VERSION';
  9. $VERSION = '2.04';
  10.  
  11. use base 'Mail::Mailer';
  12.  
  13. sub set_headers
  14. {   my ($self, $hdrs) = @_;
  15.  
  16.     local $\ = "";
  17.  
  18.     foreach (keys %$hdrs)
  19.     {   next unless m/^[A-Z]/;
  20.  
  21.         foreach my $h ($self->to_array($hdrs->{$_}))
  22.         {   $h =~ s/\n+\Z//;
  23.             print $self "$_: $h\n";
  24.         }
  25.     }
  26.  
  27.     print $self "\n";    # terminate headers
  28. }
  29.  
  30. 1;
  31.